home *** CD-ROM | disk | FTP | other *** search
/ Whiteline: Alpha / Whiteline Alpha.iso / progtool / c / gcc / crssrc16.zoo / src / Makefile < prev    next >
Encoding:
Makefile  |  1992-10-09  |  2.7 KB  |  153 lines

  1. #
  2. # Top level Makefile for TOS-Gcc curses library
  3. #
  4.  
  5. # GCC configuration info...
  6.  
  7. # Leave the next line undefined for native compilation setup.
  8. CROSSDIR := /net/acae127/home/bammi/atari/cross-gcc
  9.  
  10. # Define MINTFLAG for MiNT versions of the libraries
  11. #MINTFLAG := -mint
  12.  
  13. ifdef MINTFLAG
  14. MINTOPT := -mint
  15. m       := m
  16. else
  17. MINTOPT :=
  18. m       :=
  19. endif
  20.  
  21. ifdef CROSSDIR
  22.  
  23. # Set up to do cross-compiling...
  24.  
  25. CROSSLIB := $(CROSSDIR)/lib
  26. CROSSBIN := $(CROSSDIR)/bin
  27. CROSSINC := $(CROSSDIR)/include
  28.  
  29. AR    := $(CROSSBIN)/car
  30. AS    := cgcc $(MINTOPT)
  31. CC    := cgcc $(MINTOPT)
  32. LIB   := $(CROSSLIB)
  33. INC   := $(CROSSINC)
  34. CP    := cp
  35.  
  36. else
  37.  
  38. # Set up to run native...
  39.  
  40. AR    := gcc-ar
  41. AS    := gcc $(MINTOPT)
  42. CC    := gcc $(MINTOPT)
  43. LIB   := c:\gnu\lib
  44. INC   := c:\gnu\include
  45. CP    := cp
  46.  
  47. endif
  48.  
  49. # Additional options for compiling C code
  50.  
  51. #XFLAGS := -I../co
  52. DEFINES := -DDGK -DGEMDOS
  53.  
  54. # Dynamic selection of options for each target library...
  55.  
  56. ifneq (,$(findstring debug,$(TARGET)))
  57. OPTIM= -O -g -Wstrict-prototypes
  58. FRAME=
  59. DEBUG=
  60. g=g
  61. else
  62. OPTIM= -O2 -fstrength-reduce
  63. FRAME= -fomit-frame-pointer
  64. DEBUG= -DNDEBUG
  65. g=
  66. endif
  67.  
  68. ifneq (,$(findstring long-int,$(TARGET)))
  69. SHORT=
  70. DSHORT=
  71. ST=
  72. else
  73. SHORT= -mshort
  74. DSHORT= -DSHORTLIB
  75. ST=16
  76. endif
  77.  
  78. ifneq (,$(findstring 68020,$(TARGET)))
  79. CC := $(CC) -m68020
  80. endif
  81.  
  82. ifneq (,$(findstring baserel,$(TARGET)))
  83. CC := $(CC) -mbaserel
  84. b=b
  85. else
  86. b=
  87. endif
  88.  
  89. # common subset of options; no int size or omit-frame-pointer:
  90. COPTS= $(DEBUG) $(OPTIM) $(DEFINES) $(XFLAGS) -I.
  91.  
  92. # Base options CC; includes int size but not omit-frame-pointer
  93. CFFLAGS = $(SHORT) $(COPTS)
  94.  
  95. # normal CFLAGS including int size and omit-frame-pointer
  96. CFLAGS= $(CFFLAGS) $(FRAME)
  97.  
  98. # cflags for stuff that needs to be compiled with 32 bit ints
  99. CLFLAGS= $(COPTS) $(FRAME) $(DSHORT)
  100.  
  101. # flags to $(CC) when it runs the assembler only
  102. ASFLAGS= -c
  103.  
  104. # flags to $(CC) when running preprocessor and assembler
  105. PPFLAGS= $(SHORT) -P -c
  106.  
  107. # library targets
  108. CURSES=$b$mcurses$g$(ST).olb
  109. TERMCAP=$b$mtermcap$g$(ST).olb
  110.  
  111. ALL= $(CURSES) $(TERMCAP)
  112. TESTS= ttcp$(ST).ttp twinkl$(ST).ttp worms$(ST).ttp
  113.  
  114. #all: lshort llong lgshort lglong
  115. top: lshort llong
  116.  
  117. lshort:
  118.     $(MAKE) clean
  119.     $(MAKE) install
  120.  
  121. llong:
  122.     $(MAKE) clean
  123.     $(MAKE) install TARGET=long-int
  124.  
  125. lgshort:
  126.           $(MAKE) clean
  127.           $(MAKE) install TARGET=debug
  128.  
  129. lglong:
  130.           $(MAKE) clean
  131.           $(MAKE) install TARGET="long-int debug"
  132.  
  133. l020short:
  134.           $(MAKE) clean
  135.           $(MAKE) install020 TARGET=68020
  136.  
  137. l020long:
  138.           $(MAKE) clean
  139.           $(MAKE) install020 TARGET="68020 long-int"
  140.  
  141. lbshort:
  142.           $(MAKE) clean
  143.           $(MAKE) install TARGET="baserel"
  144.  
  145. lblong:
  146.           $(MAKE) clean
  147.           $(MAKE) install TARGET="long-int baserel"
  148.  
  149.  
  150. # Get the rules to build everything...
  151.  
  152. include mincl
  153.